﻿/*
 
Celerity: Sensory Overload
Copright 2012 by Adam Hill, David Gannon, Thomas Tamblyn & Patrick Ytting
Contact: adam.hill@outlook.com
Website: adamhill.org
Licence: MS-Pl Licence
  
 */

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace Celerity
{
    public partial class CelerityGame : Game
    {
        protected override void Draw(GameTime gameTime)
        {
            GraphicsDevice.Clear(CeleritySettings.DeviceClearColour);
            base.Draw(gameTime);
            #region Begin SpriteBatch
            //spriteBatch.Begin();
            spriteBatch.Begin(SpriteSortMode.Deferred, 
                BlendState.AlphaBlend,
                SamplerState.LinearClamp,
                null, 
                null, null
                 );
            //spriteBatch.Begin(SpriteSortMode.BackToFront,
            //    BlendState.NonPremultiplied,
            //    SamplerState.PointClamp,
            //    DepthStencilState.Default,
            //    RasterizerState.CullNone);
            #endregion /Begin

            //Modules & Layers
            world.Draw(gameTime);
            ui.Draw(input.DisplayMouse);

            #region End SpriteBatch
            spriteBatch.End();
            #endregion /End
        }
    }
}
